package com.study.controller;

import com.study.stream.DefaultSendService;
import com.study.stream.jack.JackReceiveService;
import com.study.stream.jack.JackSendService;
import com.study.vo.StudyMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/message")
public class MessageController {

    @Autowired
    private DefaultSendService defaultSendService;
    @Autowired
    private JackSendService jackSendService;

    @GetMapping("/default")
    public void defaultSend(){
        defaultSendService.sendMessage(StudyMessage.defaultMessage());
    }

    @GetMapping("/jack")
    public void JackSend(){
        jackSendService.sendMessage(StudyMessage.defaultMessage());

    }


}
